<?php
	$fields = array();
	$id		= EbController::$request->getData("id");
	
	if (!is_null($id))
	{
		$Reportage_model = EbModel::getModel('VarPeople','Reportage');
		$Reportage = $Reportage_model->selectById_1($id);
	}


	$fields []= (object) array('label' => 'nom','name' => 'nom');
	$fields []= (object) array('label' => 'description','name' => 'description');
	$fields []= (object) array('label' => 'date','name' => 'date');
	$fields []= (object) array('label' => 'ville','name' => 'ville');

	if (isset($Reportage))
	{
		$fields[0]->value = $Reportage->nom;
		$fields[1]->value = $Reportage->description;
		$fields[2]->value = $Reportage->date;
		$fields[3]->value = $Reportage->ville;
	}
		
	eb_widget('form',array('action' => '/VarPeople/EditReportage.do','fields' => $fields));

?>